<?php
require_once("conn.php");
require_once("functions.php");
//echo "<pre>";
//print_r($config);
$sql = "select * from `link` where type = 2";
$row_user = $mysql->query($sql);
?>
<html>
	<head>
		<meta charset="UTF-8">
		<title>微有趣</title>
		<meta name="keywords" content=""/>
		<meta name="description" content=""/>
		<meta name="apple-mobile-web-app-capable" content="yes"/>
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="format-detection" content="telephone=no">
		<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
		<link rel="stylesheet" type="text/css" href="./assets/css/reset.css"/>
		<link rel="stylesheet" type="text/css" href="./assets/css/qrcode.css"/>	
		<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
		<script>
			function changeSize() {
				var propo = $(window).width() / 640;
				$('html').css('font-size', 40 * propo + 'px');
			};
			changeSize();
			$(window).resize(function() {
				changeSize();
			});
		</script>
	</head>
	<body>
		<div class="wrap">
			<div class="user_id">
				ID：<?php echo $_GET['id']?>
			</div>
			<div class="con">
				<div class="qrpage">
					<!--				生成邀请的二维码-->
				<?php
				$uid = $_GET['id'];
				$url = "http://".$row_user[0]['link']."/weiApp/register.php?pid=".$uid;
				$qrcodeText = "http://qr.liantu.com/api.php?text=".$url;
//				echo $qrcodeText;
				?>
					<div class="qrimg">
						<img src="<?=$qrcodeText?>"/>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
